// filename: IAsyncTcpSocket.h
// author: enic
// date: 2015-06-26

#pragma once

#include "IpEndpoint.h"

class IAsyncTcpSocket;

typedef std::function<void(IAsyncTcpSocket*)> TTcpSocketCloseSink;
typedef std::function<void(IAsyncTcpSocket*)> TConnectSink;
typedef std::function<void(IAsyncTcpSocket*)> TDisConnectSink;
typedef std::function<void(IAsyncTcpSocket*)> TSendSink;
typedef std::function<void(IAsyncTcpSocket*)> TReadSink;

class IAsyncTcpSocket
{
public:
	virtual ~IAsyncTcpSocket() {}

public:
	virtual void Close() = 0;
	virtual void AsyncConnect(const IpEndpoint& ipEndPoint) = 0;
	virtual void AsyncSend() = 0;
	virtual void AsyncRead() = 0;
};
